<!-- angular通过ng-modal添加模态框时，不需要外层的div，只需从modal-content开始即可 -->
<style>
    .required-error {
        border: 1px solid red;
    }
    .required-success {
        border: 1px solid #cfdadd;
    }
</style>
<div class="modal-content">
    <div class="modal-header">
        <h3 class="modal-title">{{info.radioStatus == "true" ? "新增功能点" :  info.Radios ? "修改功能点": "选择已有功能点"}}</h3>
    </div>
    <form class="modal-body form-horizontal">
        <div class="form-group" ng-hide="info.Radios">
            <!--<label class="col-sm-2 control-label">功能点：</label>-->
            <!--<div class="col-sm-5 radio">-->
                <!--<label>-->
                    <!--<input type="radio" name="optionsRadios" value="true" ng-model="info.radioStatus" ng-change="radioChange()" checked>-->
                    <!--新增功能点-->
                <!--</label>-->
            <!--</div>-->
            <!--<div class="col-sm-5 radio" ng-hide="info.Radios">-->
                <!--<label>-->
                    <!--<input type="radio" name="optionsRadios" value="false" ng-model="info.radioStatus" ng-change="radioChange()">-->
                    <!--选择已有功能点-->
                <!--</label>-->
            <!--</div>-->
        </div>
        <div class="line-lg pull-in" style="margin-top: 8px;margin-bottom: 8px;"></div>
        <!-- 新增功能点 -->
        <div class="form-group" ng-if="info.radioStatus == 'true' || info.Radios">
            <label class="col-sm-2 control-label">类型：</label>
            <div class="col-sm-10 form-type">
                <m-ui-select prompt="请选择类型"
                             itme-list="info.featureTypeList"
                             selected-item="info.sltFeatureItem"
                             select-item-fun="selectFeatureType(item)">
                </m-ui-select>
            </div>
        </div>
        <div class="form-group" ng-if="info.radioStatus == 'true' || info.Radios">
            <label class="col-sm-2 control-label">名称：</label>
            <div class="col-sm-10 form-name">
                <input type="text" class="form-control" placeholder="请输入" ng-model="feature.name">
            </div>
        </div>
        <!-- <div class="line-lg pull-in" ng-if="info.radioStatus == 'true'"></div>
        <div class="form-group" ng-if="info.radioStatus == 'true'">
            <label class="col-sm-2 control-label">使用角色：</label>
            <div class="col-sm-10 form-role">
                <ui-select multiple ng-model="info.selectRoleList" theme="bootstrap" ng-disabled="disabled" on-select="selectRole($item, $model)" on-remove="removeRole($item, $model)">
                    <ui-select-match placeholder="查询角色...">{{$item.value}}</ui-select-match>
                    <ui-select-choices group-by="someGroupFn" repeat="role in info.roleList | propsFilter: {value: $select.search}|limitTo:15">
                        <div>
                            角色：<span ng-bind-html="role.value | highlight: $select.search"></span>
                        </div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="line-lg pull-in" ng-if="info.radioStatus == 'true'"></div>
        <div class="form-group" ng-if="info.radioStatus == 'true'">
            <label class="col-sm-2 control-label">功能描述：</label>
            <div class="col-sm-10 form-desc">
                <textarea class="form-control" rows="3" placeholder="请输入" ng-model="feature.desc"></textarea>
            </div>
        </div>
        <div class="line-lg pull-in" ng-if="info.radioStatus == 'true'"></div>
        <div class="form-group" ng-if="info.radioStatus == 'true'">
            <label class="col-sm-2 control-label">操作输入：</label>
            <div class="col-sm-10 form-in">
                <textarea class="form-control" rows="3" placeholder="请输入" ng-model="feature.in"></textarea>
            </div>
        </div>
        <div class="line-lg pull-in" ng-if="info.radioStatus == 'true'"></div>
        <div class="form-group" ng-if="info.radioStatus == 'true'">
            <label class="col-sm-2 control-label">处理：</label>
            <div class="col-sm-10 form-logic">
                <textarea class="form-control" rows="3" placeholder="请输入" ng-model="feature.logic"></textarea>
            </div>
        </div>
        <div class="line-lg pull-in" ng-if="info.radioStatus == 'true'"></div>
        <div class="form-group" ng-if="info.radioStatus == 'true'">
            <label class="col-sm-2 control-label">展示输出：</label>
            <div class="col-sm-10 form-out">
                <textarea class="form-control" rows="3" placeholder="请输入" ng-model="feature.out"></textarea>
            </div>
        </div> -->
        <!-- end 新增功能点 -->
        <!-- 已有功能点 -->
        <div ng-hide="info.Radios">
            <div class="form-group" ng-if="info.radioStatus == 'false'">
                <label class="col-sm-2 control-label">查询：</label>
                <div class="col-sm-10 form-select">
                    <ui-select ng-model="info.selectValue" theme="bootstrap">
                        <ui-select-match placeholder="搜索已有功能点">{{$select.selected.path}}</ui-select-match>
                        <ui-select-choices repeat="feature in info.featureList | filter: $select.search|limitTo:15">
                            <div ng-bind-html="feature.path + '/' +feature.featureName | highlight: $select.search"></div>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="line-lg pull-in" ng-if="info.radioStatus == 'false'"></div>
            <div class="form-group" ng-if="info.radioStatus == 'false'">
                <label class="col-sm-2 control-label">已选名称：</label>
                <div class="col-sm-10">
                    <label class="control-label">{{info.selectValue.featureName ? info.selectValue.featureName : "未定义"}}</label>
                </div>
            </div>
            <div class="line-lg pull-in" ng-if="info.radioStatus == 'false'"></div>
            <div class="form-group" ng-if="info.radioStatus == 'false'">
                <label class="col-sm-2 control-label">已选路径：</label>
                <div class="col-sm-10">
                    <label class="control-label">{{info.selectValue.path ? info.selectValue.path : "未定义"}}</label>
                </div>
            </div>
        </div>
        <!-- end 已有功能点 -->
    </form>
    <div class="modal-footer">
        <button type="button" class="btn btn-primary" ng-click="createClick()">保存</button>
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancelClick()">取消</button>
    </div>
</div>
